package com.burges.net.customTypeInformation;

import org.apache.flink.api.common.typeinfo.TypeInfoFactory;
import org.apache.flink.api.common.typeinfo.TypeInformation;

import java.lang.reflect.Type;
import java.util.Map;

/**
 * 创建人    BurgessLee
 * 创建时间   2020/1/25
 * 描述
 */
public class CustomTypeInfoFactory extends TypeInfoFactory<CustomTuple> {

    @Override
    public TypeInformation<CustomTuple> createTypeInfo(Type t, Map<String, TypeInformation<?>> genericParameters) {
        return new CustomTupleTypeInfo(genericParameters.get("T0"), genericParameters.get("T1"));
    }

}
